package com.example.androidmainshixun.view;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.androidmainshixun.R;

public class SetUp extends AppCompatActivity implements View.OnClickListener {
    private TextView mpass_edit;
    private TextView personcenter;
    private TextView goto_useragree;
    private TextView goto_address;
    private TextView goto_prisetting;
    private TextView goto_feedback;
    private TextView goto_aboutus;
    private  TextView goto_pri;
    private ImageView msetUp_back_mine;
    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.set_up);
        mpass_edit=findViewById(R.id.pass_edit);
        personcenter=findViewById(R.id.goto_percen);
        goto_useragree=findViewById(R.id.goto_useragree);
        msetUp_back_mine=findViewById(R.id.setUp_back_mine);
        goto_address=findViewById(R.id.goto_address);
        goto_prisetting=findViewById(R.id.goto_prisetting);
        goto_feedback=findViewById(R.id.goto_feedback);
        goto_aboutus=findViewById(R.id.goto_aboutus);
        goto_pri=findViewById(R.id.goto_priagree);

        mpass_edit.setOnClickListener(this);
        personcenter.setOnClickListener(this);
        goto_useragree.setOnClickListener(this);
        msetUp_back_mine.setOnClickListener(this);
        goto_address.setOnClickListener(this);
        goto_prisetting.setOnClickListener(this);
        goto_feedback.setOnClickListener(this);
        goto_aboutus.setOnClickListener(this);
        goto_pri.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
    int id=v.getId();
    if (id == R.id.pass_edit){
        Intent intent=new Intent(this, ActivityPassEdit.class);
        startActivity(intent);
    } else if (id == R.id.goto_percen) {
        Intent intent=new Intent(this, PersonalCenter.class);
        startActivity(intent);
    } else if (id == R.id.goto_useragree) {
        Intent intent=new Intent(this, UserAgreement.class);
        startActivity(intent);
    } else if (id == R.id.setUp_back_mine) {
        finish();
    } else if (id == R.id.goto_address) {
        Intent intent=new Intent(this, Address.class);
        startActivity(intent);
    } else if (id == R.id.goto_prisetting) {
        Intent intent=new Intent(this, PriSetting.class);
        startActivity(intent);
    } else if (id == R.id.goto_feedback) {
        Intent intent=new Intent(this, FeedBack.class);
        startActivity(intent);
    } else if (id == R.id.goto_aboutus) {
        Intent intent=new Intent(this, AboutUs.class);
        startActivity(intent);
    } else if (id == R.id.goto_priagree) {
        Intent intent=new Intent(this, PriAgree.class);
        startActivity(intent);
    }
    }
}
